export default {
	data() {
		return {}
	},
	//1.配置发送给朋友
	onShareAppMessage() {
		let title = "";
		let imageUrl = "";
		let refereeId = uni.getStorageSync('userId');
		let baseConfig = uni.getStorageSync('baseInfo');
		if(baseConfig.wxShare.share_bg_title != "")title = baseConfig.wxShare.share_bg_title;
		if(baseConfig.wxShare.share_bg_img != "")imageUrl = baseConfig.wxShare.share_bg_img;
		
		return {
			title: title, //分享的标题
			path: 'pages/index/index?refereeId='+refereeId, //点击分享链接之后进入的页面路径
			imageUrl: imageUrl //分享发送的链接图片地址
		};
	},
	//2.配置分享到朋友圈
	onShareTimeline() {
		let title = "";
		let imageUrl = "";
		let refereeId = uni.getStorageSync('userId');
		let baseConfig = uni.getStorageSync('baseInfo');
		if(baseConfig.wxShare.share_bg_title != "")title = baseConfig.wxShare.share_bg_title;
		if(baseConfig.wxShare.share_bg_img != "")imageUrl = baseConfig.wxShare.share_bg_img;
		return {
			title: title, //分享的标题
			path: 'pages/index/index', //点击分享链接之后进入的页面路径
		    query: 'refereeId='+refereeId, // 分享的查询参数，可选
			imageUrl: imageUrl //分享发送的链接图片地址
		}
	},
}